package org.jsbd.boss.service;

import java.util.List;
import java.util.Map;

import org.jsbd.boss.common.DataGridModel;
import org.jsbd.boss.domian.Book;

public interface IBookService {

	void save(Book book);
	
	void save(List<Book> list);
	
	/**
	 * 保存到临时表
	 * @param list
	 */
	long saveToTemp(List<Book> list);
	
	/**
	 * 将临时表中的数据更新到book表中
	 */
	void tempToBook(long counter,int bookGroupId) throws Exception;

	void update(Book book);

	Book get(Book book);
	
	Book getByMark(String mark) throws Exception;
//	Book getForRate(Book book) throws Exception;
	
	Book getById(Integer id);

	List<Book> getList(Book book);

	Map<String, Object> getListPage(DataGridModel page, Book book);
	
	/**
	 * 获取临时表数据
	 * @param page
	 * @return
	 */
	Map<String, Object> getTempPage(DataGridModel page, Book book);
	
	void delete(List<Integer> ids);
	
	int revertAllBookPayMoney();
	
	//记录 书籍失败次数
	void updateFailCount(Integer bookId,String mark);
}
